<template>
    <a-form-item class="form-column" :label="label" :prop="prop" :rules="rule">
        <slot />
    </a-form-item>
</template>
<script>
export default {
    name: 'FormColumn',
    props: {
        label: {
            type: String,
            default: ''
        },
        prop: {
            type: String,
            default: ''
        },
        inline: {
            type: Boolean,
            default: true
        },
        rule: {
            type: Array,
            default: () => []
        }
    },
    data() {
        const formItemLayout = {
            labelCol: { span: 4 },
            wrapperCol: { span: 8 }
        };
        return {
            formItemLayout
        };
    }
};
</script>
<style lang="less">
.form-column {
    margin-right: 16px !important;
    margin-bottom: 16px !important;
    .el-form-item__label {
        padding-right: 5px !important;
    }
}
</style>
